package com.dslcode.cloud.provider.goods.service;

import com.dslcode.cloud.common.dto.goods.GoodsCommonDetailDTO;
import com.dslcode.cloud.common.model.goods.GoodsCommon;
import com.dslcode.cloud.provider.goods.mapper.GoodsCommonMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by dongsilin on 2017/9/21.
 */
@Slf4j
@Service
public class GoodsCommonService {

    @Autowired
    private GoodsCommonMapper goodsCommonMapper;

    public List<GoodsCommon> findAll(){
        return goodsCommonMapper.findAll();
    }

    public GoodsCommon findById(Long id) {
        return goodsCommonMapper.findById(id);
    }

    public GoodsCommonDetailDTO findDetail(Long id) {
        return goodsCommonMapper.findDetail(id);
    }


}
